Integrand size = 24, antiderivative size = 390 \[ \int (e x)^{-1+3 n} \left (a+b \sec \left (c+d x^n\right )\right )^2 \, dx=\frac {a^2 (e x)^{3 n}}{3 e n}-\frac {i b^2 x^{-n} (e x)^{3 n}}{d e n}-\frac {4 i a b x^{-n} (e x)^{3 n} \arctan \left (e^{i \left (c+d x^n\right )}\right )}{d e n}+\frac {2 b^2 x^{-2 n} (e x)^{3 n} \log \left (1+e^{2 i \left (c+d x^n\right )}\right )}{d^2 e n}+\frac {4 i a b x^{-2 n} (e x)^{3 n} \operatorname {PolyLog}\left (2,-i e^{i \left (c+d x^n\right )}\right )}{d^2 e n}-\frac {4 i a b x^{-2 n} (e x)^{3 n} \operatorname {PolyLog}\left (2,i e^{i \left (c+d x^n\right )}\right )}{d^2 e n}-\frac {i b^2 x^{-3 n} (e x)^{3 n} \operatorname {PolyLog}\left (2,-e^{2 i \left (c+d x^n\right )}\right )}{d^3 e n}-\frac {4 a b x^{-3 n} (e x)^{3 n} \operatorname {PolyLog}\left (3,-i e^{i \left (c+d x^n\right )}\right )}{d^3 e n}+\frac {4 a b x^{-3 n} (e x)^{3 n} \operatorname {PolyLog}\left (3,i e^{i \left (c+d x^n\right )}\right )}{d^3 e n}+\frac {b^2 x^{-n} (e x)^{3 n} \tan \left (c+d x^n\right )}{d e n} \]
1/3*a^2*(e*x)^(3*n)/e/n-I*b^2*(e*x)^(3*n)/d/e/n/(x^n)-4*I*a*b*(e*x)^(3*n)* arctan(exp(I*(c+d*x^n)))/d/e/n/(x^n)+2*b^2*(e*x)^(3*n)*ln(1+exp(2*I*(c+d*x ^n)))/d^2/e/n/(x^(2*n))+4*I*a*b*(e*x)^(3*n)*polylog(2,-I*exp(I*(c+d*x^n))) /d^2/e/n/(x^(2*n))-4*I*a*b*(e*x)^(3*n)*polylog(2,I*exp(I*(c+d*x^n)))/d^2/e /n/(x^(2*n))-I*b^2*(e*x)^(3*n)*polylog(2,-exp(2*I*(c+d*x^n)))/d^3/e/n/(x^( 3*n))-4*a*b*(e*x)^(3*n)*polylog(3,-I*exp(I*(c+d*x^n)))/d^3/e/n/(x^(3*n))+4 *a*b*(e*x)^(3*n)*polylog(3,I*exp(I*(c+d*x^n)))/d^3/e/n/(x^(3*n))+b^2*(e*x) ^(3*n)*tan(c+d*x^n)/d/e/n/(x^n)
\[ \int (e x)^{-1+3 n} \left (a+b \sec \left (c+d x^n\right )\right )^2 \, dx=\int (e x)^{-1+3 n} \left (a+b \sec \left (c+d x^n\right )\right )^2 \, dx \]
Time = 0.64 (sec) , antiderivative size = 263, normalized size of antiderivative = 0.67, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.208, Rules used = {4696, 4692, 3042, 4678, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (e x)^{3 n-1} \left (a+b \sec \left (c+d x^n\right )\right )^2 \, dx\) |
\(\Big \downarrow \) 4696 |
\(\displaystyle \frac {x^{-3 n} (e x)^{3 n} \int x^{3 n-1} \left (a+b \sec \left (d x^n+c\right )\right )^2dx}{e}\) |
\(\Big \downarrow \) 4692 |
\(\displaystyle \frac {x^{-3 n} (e x)^{3 n} \int x^{2 n} \left (a+b \sec \left (d x^n+c\right )\right )^2dx^n}{e n}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {x^{-3 n} (e x)^{3 n} \int x^{2 n} \left (a+b \csc \left (d x^n+c+\frac {\pi }{2}\right )\right )^2dx^n}{e n}\) |
\(\Big \downarrow \) 4678 |
\(\displaystyle \frac {x^{-3 n} (e x)^{3 n} \int \left (a^2 x^{2 n}+b^2 \sec ^2\left (d x^n+c\right ) x^{2 n}+2 a b \sec \left (d x^n+c\right ) x^{2 n}\right )dx^n}{e n}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {x^{-3 n} (e x)^{3 n} \left (\frac {1}{3} a^2 x^{3 n}-\frac {4 i a b x^{2 n} \arctan \left (e^{i \left (c+d x^n\right )}\right )}{d}-\frac {4 a b \operatorname {PolyLog}\left (3,-i e^{i \left (d x^n+c\right )}\right )}{d^3}+\frac {4 a b \operatorname {PolyLog}\left (3,i e^{i \left (d x^n+c\right )}\right )}{d^3}+\frac {4 i a b x^n \operatorname {PolyLog}\left (2,-i e^{i \left (d x^n+c\right )}\right )}{d^2}-\frac {4 i a b x^n \operatorname {PolyLog}\left (2,i e^{i \left (d x^n+c\right )}\right )}{d^2}-\frac {i b^2 \operatorname {PolyLog}\left (2,-e^{2 i \left (d x^n+c\right )}\right )}{d^3}+\frac {2 b^2 x^n \log \left (1+e^{2 i \left (c+d x^n\right )}\right )}{d^2}+\frac {b^2 x^{2 n} \tan \left (c+d x^n\right )}{d}-\frac {i b^2 x^{2 n}}{d}\right )}{e n}\) |
((e*x)^(3*n)*(((-I)*b^2*x^(2*n))/d + (a^2*x^(3*n))/3 - ((4*I)*a*b*x^(2*n)* ArcTan[E^(I*(c + d*x^n))])/d + (2*b^2*x^n*Log[1 + E^((2*I)*(c + d*x^n))])/ d^2 + ((4*I)*a*b*x^n*PolyLog[2, (-I)*E^(I*(c + d*x^n))])/d^2 - ((4*I)*a*b* x^n*PolyLog[2, I*E^(I*(c + d*x^n))])/d^2 - (I*b^2*PolyLog[2, -E^((2*I)*(c + d*x^n))])/d^3 - (4*a*b*PolyLog[3, (-I)*E^(I*(c + d*x^n))])/d^3 + (4*a*b* PolyLog[3, I*E^(I*(c + d*x^n))])/d^3 + (b^2*x^(2*n)*Tan[c + d*x^n])/d))/(e *n*x^(3*n))
3.1.77.3.1 Defintions of rubi rules used
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(n_.)*((c_.) + (d_.)*(x_))^(m_.) , x_Symbol] :> Int[ExpandIntegrand[(c + d*x)^m, (a + b*Csc[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[m, 0] && IGtQ[n, 0]
Int[(x_)^(m_.)*((a_.) + (b_.)*Sec[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol ] :> Simp[1/n Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a + b*Sec[c + d*x])^ p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplify[(m + 1)/n], 0] && IntegerQ[p]
Int[((e_)*(x_))^(m_.)*((a_.) + (b_.)*Sec[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x _Symbol] :> Simp[e^IntPart[m]*((e*x)^FracPart[m]/x^FracPart[m]) Int[x^m*( a + b*Sec[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m, n, p}, x]
\[\int \left (e x \right )^{3 n -1} {\left (a +b \sec \left (c +d \,x^{n}\right )\right )}^{2}d x\]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1032 vs. \(2 (365) = 730\).
Time = 0.36 (sec) , antiderivative size = 1032, normalized size of antiderivative = 2.65 \[ \int (e x)^{-1+3 n} \left (a+b \sec \left (c+d x^n\right )\right )^2 \, dx=\text {Too large to display} \]
1/3*(a^2*d^3*e^(3*n - 1)*x^(3*n)*cos(d*x^n + c) + 3*b^2*d^2*e^(3*n - 1)*x^ (2*n)*sin(d*x^n + c) - 6*a*b*e^(3*n - 1)*cos(d*x^n + c)*polylog(3, I*cos(d *x^n + c) + sin(d*x^n + c)) + 6*a*b*e^(3*n - 1)*cos(d*x^n + c)*polylog(3, I*cos(d*x^n + c) - sin(d*x^n + c)) - 6*a*b*e^(3*n - 1)*cos(d*x^n + c)*poly log(3, -I*cos(d*x^n + c) + sin(d*x^n + c)) + 6*a*b*e^(3*n - 1)*cos(d*x^n + c)*polylog(3, -I*cos(d*x^n + c) - sin(d*x^n + c)) + 3*(a*b*c^2 - b^2*c)*e ^(3*n - 1)*cos(d*x^n + c)*log(cos(d*x^n + c) + I*sin(d*x^n + c) + I) - 3*( a*b*c^2 + b^2*c)*e^(3*n - 1)*cos(d*x^n + c)*log(cos(d*x^n + c) - I*sin(d*x ^n + c) + I) + 3*(a*b*c^2 - b^2*c)*e^(3*n - 1)*cos(d*x^n + c)*log(-cos(d*x ^n + c) + I*sin(d*x^n + c) + I) - 3*(a*b*c^2 + b^2*c)*e^(3*n - 1)*cos(d*x^ n + c)*log(-cos(d*x^n + c) - I*sin(d*x^n + c) + I) - 3*(2*I*a*b*d*e^(3*n - 1)*x^n - I*b^2*e^(3*n - 1))*cos(d*x^n + c)*dilog(I*cos(d*x^n + c) + sin(d *x^n + c)) - 3*(2*I*a*b*d*e^(3*n - 1)*x^n + I*b^2*e^(3*n - 1))*cos(d*x^n + c)*dilog(I*cos(d*x^n + c) - sin(d*x^n + c)) - 3*(-2*I*a*b*d*e^(3*n - 1)*x ^n + I*b^2*e^(3*n - 1))*cos(d*x^n + c)*dilog(-I*cos(d*x^n + c) + sin(d*x^n + c)) - 3*(-2*I*a*b*d*e^(3*n - 1)*x^n - I*b^2*e^(3*n - 1))*cos(d*x^n + c) *dilog(-I*cos(d*x^n + c) - sin(d*x^n + c)) + 3*(a*b*d^2*e^(3*n - 1)*x^(2*n ) + b^2*d*e^(3*n - 1)*x^n - (a*b*c^2 - b^2*c)*e^(3*n - 1))*cos(d*x^n + c)* log(I*cos(d*x^n + c) + sin(d*x^n + c) + 1) - 3*(a*b*d^2*e^(3*n - 1)*x^(2*n ) - b^2*d*e^(3*n - 1)*x^n - (a*b*c^2 + b^2*c)*e^(3*n - 1))*cos(d*x^n + ...
\[ \int (e x)^{-1+3 n} \left (a+b \sec \left (c+d x^n\right )\right )^2 \, dx=\int \left (e x\right )^{3 n - 1} \left (a + b \sec {\left (c + d x^{n} \right )}\right )^{2}\, dx \]
\[ \int (e x)^{-1+3 n} \left (a+b \sec \left (c+d x^n\right )\right )^2 \, dx=\int { {\left (b \sec \left (d x^{n} + c\right ) + a\right )}^{2} \left (e x\right )^{3 \, n - 1} \,d x } \]
1/3*(e*x)^(3*n)*a^2/(e*n) + (2*b^2*e^(3*n)*x^(2*n)*sin(2*d*x^n + 2*c) + (d *e*n*cos(2*d*x^n + 2*c)^2 + d*e*n*sin(2*d*x^n + 2*c)^2 + 2*d*e*n*cos(2*d*x ^n + 2*c) + d*e*n)*integrate(4*(a*b*d*e^(3*n)*x^(3*n)*cos(2*d*x^n + 2*c)*c os(d*x^n + c) + a*b*d*e^(3*n)*x^(3*n)*cos(d*x^n + c) + (a*b*d*e^(3*n)*x^(3 *n)*sin(d*x^n + c) - b^2*e^(3*n)*x^(2*n))*sin(2*d*x^n + 2*c))/(d*e*x*cos(2 *d*x^n + 2*c)^2 + d*e*x*sin(2*d*x^n + 2*c)^2 + 2*d*e*x*cos(2*d*x^n + 2*c) + d*e*x), x))/(d*e*n*cos(2*d*x^n + 2*c)^2 + d*e*n*sin(2*d*x^n + 2*c)^2 + 2 *d*e*n*cos(2*d*x^n + 2*c) + d*e*n)
\[ \int (e x)^{-1+3 n} \left (a+b \sec \left (c+d x^n\right )\right )^2 \, dx=\int { {\left (b \sec \left (d x^{n} + c\right ) + a\right )}^{2} \left (e x\right )^{3 \, n - 1} \,d x } \]
Timed out. \[ \int (e x)^{-1+3 n} \left (a+b \sec \left (c+d x^n\right )\right )^2 \, dx=\int {\left (a+\frac {b}{\cos \left (c+d\,x^n\right )}\right )}^2\,{\left (e\,x\right )}^{3\,n-1} \,d x \]